#include <bits/stdc++.h>
using namespace std;
int dx[9] = {1, 2, 2, 1, -1, -2, -2, -1, 0};
int dy[9] = {-2, -1, 1, 2, 2, 1, -1, -2, 0};
int n, m;
int na, ma;
int ans = 0;
void bfs(int x, int y)
{
	if(x == n && y == m)
	{
		ans++;
		return ;
	}
	int tag = 0, tah = 0;
	for(int i = 0; i < 9; i++)
	{
		int tx = dx[i] + na, ty = dy[i] + ma;
		if(tx < 0 || tx > n || ty < 0 || ty > m)
			continue;
		if((x + 1 == tx && y == ty) || x + 1 > n)
			tag = 1;
		if((x != tx && y + 1 != ty) || y + 1 > m)
			tah = 1;
	}
	if(tag == 0)
		bfs(x + 1, y);
	if(tah == 0)
		bfs(x, y + 1);
}
int main()
{
	cin >> n >> m;
	cin >> na >> ma;
	bfs(0, 0);
	cout << ans << endl;
	return 0;
}